package com.handinglian.ai.netty.client;

import net.jodah.expiringmap.ExpirationPolicy;
import net.jodah.expiringmap.ExpiringMap;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;

public class GlobalConfig {
	public static StringBuffer AI_BUFFER = new StringBuffer(1024);
	public static Map<String,Integer> SCENE_MAP = ExpiringMap.builder()
			.maxSize(2000)
			.expiration(300, TimeUnit.SECONDS)
			.expirationPolicy(ExpirationPolicy.ACCESSED)
			.variableExpiration()
			.build();
	public static Map<String,String> SESSION_ID_MAP = ExpiringMap.builder()
			.maxSize(2000)
			.expiration(300, TimeUnit.SECONDS)
			.expirationPolicy(ExpirationPolicy.ACCESSED)
			.variableExpiration()
			.build();
	public static Map<String,Integer> ERROR_COUNT = ExpiringMap.builder()
			.maxSize(2000)
			.expiration(300, TimeUnit.SECONDS)
			.expirationPolicy(ExpirationPolicy.ACCESSED)
			.variableExpiration()
			.build();
}
